package com.just.just_bankreputationsystem.Mapper;

import com.just.just_bankreputationsystem.Model.Type;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TypeMapper {
    @Insert("insert into tb_banktype values(default,#{name})")
    int add(Type type);

    @Select("select * from tb_banktype")
    List<Type> show();

    @Delete("delete from tb_banktype where id=#{id}")
    void delType(int id);

    @Update("update tb_banktype set name=#{name} where id=#{id}")
    int update(Type type);

    @Select("select * from tb_banktype where id=#{id}")
    Type selectType(int id);
}
